<template>
  <header>
    <i class="iconfont icon-weibiaoti--" @click="goBack"></i>
    <slot>
      <span>登录</span>
    </slot>

    <i class="iconfont icon-home" @click="$router.push('/home')"></i>
  </header>
</template>

<script>
export default {
  name: "Header",
  methods: {
    goBack() {
      this.$router.back();
    },
  },
};
</script>

<style scoped lang="scss">
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 1.173333rem;
  color: #fff;
  background-color: #b0352f;
  span {
    font-size: 0.5rem;
  }
  i {
    width: 1rem;
    line-height: 1rem;
    margin: 0 0.266666rem;
    font-size: 0.6rem;
    text-align: center;
  }
}
</style>